Conversation
…package reference comments
…ct/assembly, allowing for AoT in the main project and non-AoT in that converter only -- BREAKING CHANGE. Updated with diff-shared.sh.
Contributor
SummarySummary
CoverageUlidNsConverter - 75%
UlidTool - 100%
UlidType - 99.1%
|
Contributor
SummarySummary
CoverageUlidNsConverter - 75%
UlidTool - 100%
UlidType - 99.1%
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR splits the Newtonsoft.Json ULID converter out of the main vm2.Ulid product so the primary package can remain AoT-compatible, while offering Newtonsoft.Json support via a companion package (vm2.UlidSerialization.NsJson). This is a breaking change because vm2.Ulid is no longer annotated with a Newtonsoft.Json converter attribute.
Changes:
- Introduces a new companion project/package (
src/UlidNsConverter) that contains the Newtonsoft.JsonUlidNsConverter. - Removes Newtonsoft.Json coupling from
src/UlidType(incl. removing the Newtonsoft converter attribute onUlid) to preserve AoT compatibility. - Refactors build/CI/package configuration (Directory.Build.props, central package versions, CI packaging list) to align with the new project split.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/UlidType.Tests/usings.cs | Adds global usings for Newtonsoft.Json and the new companion converter namespace used by tests. |
| test/UlidType.Tests/UlidType.Tests.csproj | References the new UlidNsConverter project so tests can exercise the companion converter. |
| test/UlidType.Tests/packages.lock.json | Updates dependency lock to reflect the new project reference and revised dependency graph. |
| test/UlidType.Tests/NsJson/UlidNsConverterTests.cs | Updates Newtonsoft.Json converter tests to use new wiring (incl. default settings). |
| test/UlidTool.Tests/packages.lock.json | Updates dependency lock to reflect the revised dependency graph. |
| src/UlidType/usings.cs | Removes NsJson-related usings to decouple the main library from Newtonsoft.Json. |
| src/UlidType/Ulid.cs | Removes the Newtonsoft.Json converter attribute (breaking change) while keeping System.Text.Json converter. |
| src/UlidType/packages.lock.json | Updates dependency lock after removing Newtonsoft.Json and other removed direct refs. |
| src/UlidTool/UlidTool.csproj | Marks the tool project as not AoT compatible / disables AoT reference verification. |
| src/UlidTool/packages.lock.json | Updates dependency lock to reflect removed dependencies and AoT refactoring. |
| src/UlidNsConverter/UlidNsConverter.csproj | Adds new companion package project that depends on Newtonsoft.Json and references UlidType. |
| src/UlidNsConverter/UlidNsConverter.cs | Adjusts converter implementation to explicitly call vm2.Ulid.Parse(...) after project split. |
| src/UlidNsConverter/packages.lock.json | Adds lock file for the new companion package project. |
| README.md | Documents AoT focus and adds serialization guidance pointing to the new companion package. |
| examples/packages.lock.json | Updates dependency lock to reflect revised dependency graph. |
| Directory.Packages.props | Refactors central package versions (moves/removes versions now no longer used broadly). |
| Directory.Build.props | Adds project-role detection + AoT defaults and refactors common/test/build settings. |
| benchmarks/UlidType.Benchmarks/packages.lock.json | Updates benchmark dependency lock to reflect revised dependency graph. |
| .github/workflows/CI.yaml | Adds the new companion project to the list of package projects built/packed in CI. |
Contributor
SummarySummary
CoverageUlid - 99.1%
UlidNsConverter - 75%
UlidTool - 100%
|
Contributor
SummarySummary
Coveragevm2.Serialization.NsJson.Ulid - 75%
vm2.Ulid - 99.1%
vm2.UlidTool - 100%
|
… assemblies, folders. BREAKING CHANGE
…ps for consistency
Contributor
SummarySummary
Coveragevm2.Serialization.NsJson.Ulid - 75%
vm2.Ulid - 99.1%
vm2.UlidTool - 100%
|
Contributor
SummarySummary
Coveragevm2.Serialization.NsJson.Ulid - 75%
vm2.Ulid - 99.1%
vm2.UlidTool - 100%
|
Contributor
SummarySummary
CoverageSerialization.NsJson.Ulid - 75%
Ulid - 99.1%
UlidTool - 100%
|
Contributor
SummarySummary
CoverageSerialization.NsJson.Ulid - 75%
Ulid - 99.1%
UlidTool - 100%
|
Contributor
SummarySummary
CoverageSerialization.NsJson.Ulid - 75%
Ulid - 99.1%
UlidTool - 100%
|
Contributor
SummarySummary
CoverageSerialization.NsJson.Ulid - 75%
Ulid - 99.1%
UlidTool - 100%
|
…command line options
Contributor
|
| Branch | fix/aot |
| Testbed | ubuntu-latest |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result nanoseconds (ns) (Result Δ%) | Upper Boundary nanoseconds (ns) (Limit %) | allocated | Benchmark Result Measure (units) (Result Δ%) | Upper Boundary Measure (units) (Limit %) | gen1-collects | Benchmark Result Measure (units) (Result Δ%) | Upper Boundary Measure (units) (Limit %) | gen2-collects | Benchmark Result Measure (units) (Result Δ%) | Upper Boundary Measure (units) (Limit %) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| vm2.Benchmarks.Ulid.Factory_NewUlid | 📈 view plot 🚷 view threshold | 60.20 ns(-2.84%)Baseline: 61.96 ns | 74.35 ns (80.96%) | 📈 view plot 🚷 view threshold | 40.00 units(0.00%)Baseline: 40.00 units | 48.00 units (83.33%) | 📈 view plot 🚷 view threshold | 0.00 units(0.00%)Baseline: 0.00 units | 0.00 units (0.00%) | 📈 view plot 🚷 view threshold | 0.00 units(0.00%)Baseline: 0.00 units | 0.00 units (0.00%) |
| vm2.Benchmarks.Ulid.Ulid_NewUlid | 📈 view plot 🚷 view threshold | 60.40 ns(-2.44%)Baseline: 61.91 ns | 74.29 ns (81.30%) | 📈 view plot 🚷 view threshold | 40.00 units(0.00%)Baseline: 40.00 units | 48.00 units (83.33%) | 📈 view plot 🚷 view threshold | 0.00 units(0.00%)Baseline: 0.00 units | 0.00 units (0.00%) | 📈 view plot 🚷 view threshold | 0.00 units(0.00%)Baseline: 0.00 units | 0.00 units (0.00%) |
| vm2.Benchmarks.Ulid.Ulid_Parse_Utf16 | 📈 view plot 🚷 view threshold | 62.45 ns(-1.01%)Baseline: 63.09 ns | 75.71 ns (82.49%) | 📈 view plot 🚷 view threshold | 40.00 units(0.00%)Baseline: 40.00 units | 48.00 units (83.33%) | 📈 view plot 🚷 view threshold | 0.00 units(0.00%)Baseline: 0.00 units | 0.00 units (0.00%) | 📈 view plot 🚷 view threshold | 0.00 units(0.00%)Baseline: 0.00 units | 0.00 units (0.00%) |
| vm2.Benchmarks.Ulid.Ulid_Parse_Utf8 | 📈 view plot 🚷 view threshold | 53.57 ns(-1.54%)Baseline: 54.41 ns | 65.29 ns (82.05%) | 📈 view plot 🚷 view threshold | 40.00 units(0.00%)Baseline: 40.00 units | 48.00 units (83.33%) | 📈 view plot 🚷 view threshold | 0.00 units(0.00%)Baseline: 0.00 units | 0.00 units (0.00%) | 📈 view plot 🚷 view threshold | 0.00 units(0.00%)Baseline: 0.00 units | 0.00 units (0.00%) |
| vm2.Benchmarks.Ulid.Ulid_ToString | 📈 view plot 🚷 view threshold | 45.18 ns(-0.60%)Baseline: 45.45 ns | 54.55 ns (82.84%) | 📈 view plot 🚷 view threshold | 80.00 units(0.00%)Baseline: 80.00 units | 96.00 units (83.33%) | 📈 view plot 🚷 view threshold | 0.00 units(0.00%)Baseline: 0.00 units | 0.00 units (0.00%) | 📈 view plot 🚷 view threshold | 0.00 units(0.00%)Baseline: 0.00 units | 0.00 units (0.00%) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Separate NSJ converter in a companion Package to preserve AoT compatibility in the main package.
BREAKING CHANGE!
Commits
Checklist